package util;

public class VarietalRanking {
	private Varietal varietal;
	private int rank;
	
	public VarietalRanking(Varietal varietal, int rank){
		this.varietal = varietal;
		this.rank = rank;
	}
	
	public int getRanking(){
		return this.rank;
	}
	
	public Varietal getVarietal(){
		return this.varietal;
	}
	
	public int compareTo(VarietalRanking ranking){
		if(this.rank > ranking.getRanking())
			return 1;
		else if(this.rank == ranking.getRanking()){
			return 0;
		}
		else{
			return -1;
		}
	}
}
